package com.car.order.client;

import com.car.commons.core.model.Result;
import com.car.order.client.model.serve.serveInfo.ServeInfoDto;
import com.car.order.client.model.serve.serveProject.ServeProjectDto;
import com.car.order.client.model.shopping.goodsInfo.GoodsInfoDto;
import com.car.order.dto.goods.GoodsDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

@FeignClient(name = "car-serve",path = "/serve")
public interface CarServeClient {

    /**
     * 通过服务id
     * 返回一个服务项目dto的list
     * 顺便帮我检传入id的服务的类型状态是否正常
     * @param serveId 服务id
     * @return
     * @throws Exception
     */
    @GetMapping("/serveInfo/serveById.ty")
    public Result<ServeInfoDto> findServeInfoListById(@RequestParam("serveId") Integer serveId) throws Exception;


    /**
     *
     * @param serveProjectIds 服务项目id 的 set集合
     * @return 服务项目的dto的list集合
     */
    @GetMapping("/serveProject/findServeProjectListByIds.ty")
    Result<List<ServeProjectDto>> findServeProjectListByIds(@RequestParam("serveProjectIds") Set<Integer> serveProjectIds);

    /**
     *
     * @param serveId 服务id
     * @return 服务项目的dto的list集合
     */
    @GetMapping("/serveProject/findServeProjectListByServeId/{serveId}.ty")
    Result<List<ServeProjectDto>> findServeProjectListByServeId(@PathVariable("serveId") Integer serveId);

    /**
     * 修改服务评分
     * @param serveInfoDto
     * @return
     */
    @PostMapping("/serveInfo/changeServeScore.ty")
    Result changeServeScore(@RequestBody ServeInfoDto serveInfoDto);
}
